package com.wuseguang.springcloud.thread;

import com.wuseguang.springcloud.service.AttendService;
import com.wuseguang.springcloud.util.DateUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public class SaveAttendThread implements Runnable {
    private Logger logger = LoggerFactory.getLogger(this.getClass());


    @Autowired
    private AttendService attendService;

    private List<Map<String, Object>> userList;

    private String shiftid;

    private Map<String, Map<String, String>> mapShift;

    private String opertime;

    private String school_id;


    private Integer attend_groupid;


    @Override
    public void run() {
        attendService.updateattendList(shiftid, userList, mapShift, opertime, DateUtil.gettime(), attend_groupid + "", school_id, 0, opertime);
    }


    public List<Map<String, Object>> getUserList() {
        return userList;
    }

    public void setUserList(List<Map<String, Object>> userList) {
        this.userList = userList;
    }

    public String getShiftid() {
        return shiftid;
    }

    public void setShiftid(String shiftid) {
        this.shiftid = shiftid;
    }

    public Map<String, Map<String, String>> getMapShift() {
        return mapShift;
    }

    public void setMapShift(Map<String, Map<String, String>> mapShift) {
        this.mapShift = mapShift;
    }

    public String getOpertime() {
        return opertime;
    }

    public void setOpertime(String opertime) {
        this.opertime = opertime;
    }

    public String getSchool_id() {
        return school_id;
    }

    public void setSchool_id(String school_id) {
        this.school_id = school_id;
    }

    public Integer getAttend_groupid() {
        return attend_groupid;
    }

    public void setAttend_groupid(Integer attend_groupid) {
        this.attend_groupid = attend_groupid;
    }
}
